<h2><?php echo $this->translate("Friends Inviter Plugin") ?></h2>

<?php if( count($this->navigation) ): ?>
  <div class='tabs'>
    <?php
      // Render the menu
      //->setUlClass()
      echo $this->navigation()->menu()->setContainer($this->navigation)->render();
      
    ?>
  </div>
<?php endif; ?>

<script type="text/javascript">
  function friendsinviter_faq_show(id,focus) {
    if(typeof focus == 'undefined') {
      focus = 0;
    }
    
    if($(id).style.display == 'block') {
      $(id).style.display = 'none';
    } else {
      $(id).style.display = 'block';
      if(focus) {
        friendsinviter_faq_focus(id);
      }
    }
  }
  function friendsinviter_faq_focus(id) {
    var myFx = new Fx.Scroll($(document.body));
    myFx.toElement(id); 
  }
</script>

<p>
  <?php echo $this->translate("Find some quick answers on this page") ?>
</p>

<br />


<div class="admin_statistics">

  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_1').style.display=='block') ? $('friendsinviter_faq_1').style.display='none' : $('friendsinviter_faq_1').style.display='block';">
    <?php echo $this->translate('Showing Top Referrer / Top Inviter widgets on global site homepage') ?>
  </div>
  <div style='border: 1px solid #F6F6F6; padding: 5px; display: none; margin-bottom: 40px' id='friendsinviter_faq_1'>
    <img src="application/modules/Friendsinviter/externals/images/help/1.png">
  </div>

  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_2').style.display=='block') ? $('friendsinviter_faq_2').style.display='none' : $('friendsinviter_faq_2').style.display='block';">
    <?php echo $this->translate('Showing "Find Friends" Teaser on User Homepage') ?>
  </div>
  <div style='display: none;' id='friendsinviter_faq_2'>
  <div style='border: 1px solid #F6F6F6; padding: 5px'>
    <img src="application/modules/Friendsinviter/externals/images/help/3.png">
  </div>  
  <br>
  <div style='border: 1px solid #F6F6F6; padding: 5px'>
    <img src="application/modules/Friendsinviter/externals/images/help/2.png">
  </div>
  </div>

  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_3').style.display=='block') ? $('friendsinviter_faq_3').style.display='none' : $('friendsinviter_faq_3').style.display='block';">
    <?php echo $this->translate('Resetting hidden "Find Friends" Teaser') ?>
  </div>
  <div style='border: 1px solid #F6F6F6; padding: 5px; display: none; margin-bottom: 40px' id='friendsinviter_faq_3'>
    If user chooses to hide the widget, you can reset it (force to re-appear) for all users (for example once a month).
    <br>
      <a href="<?php echo $this->url(array('action' => 'clear')) ?>">Click here</a> to show it for all users. Currently hidden for <?php echo $this->hidden_count ?> out of <?php echo $this->total_users ?> total users (<?php echo sprintf("%.2f",($this->hidden_count / $this->total_users) * 100) ?>%).
  </div>

  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_4').style.display=='block') ? $('friendsinviter_faq_4').style.display='none' : $('friendsinviter_faq_4').style.display='block';">
    <?php echo $this->translate('Including "Unsubscribe" link in the invitation emails.') ?>
  </div>
  <div style='border: 1px solid #F6F6F6; padding: 5px; display: none; margin-bottom: 40px' id='friendsinviter_faq_4'>
    To conform with privacy policies, every outgoing invitation email can include an "Unsubscribe" link, which allows opting out of receiving invitation emails.
    <br>
    The link will look like: <?php echo "http://{$_SERVER['HTTP_HOST']}"
                          . Zend_Controller_Front::getInstance()->getRouter()->assemble(array(
                                'module'      => 'core',
                                'controller'  => 'invite',
                                'action'      => 'unsubscribe',
                                ), 'default');
                          ?>
                          
    <br><br>
      
      To include it in every invitation email, put a <span style='font-weight: bold'>[unsubscribe_link]</span> variable in the invitation email template.

    <br><br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/4.png">
    </div>

  </div>
  


  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_5').style.display=='block') ? $('friendsinviter_faq_5').style.display='none' : $('friendsinviter_faq_5').style.display='block';">
    <?php echo $this->translate('Creating Google API Client') ?>
  </div>
  <div style='border: 1px solid #F6F6F6; padding: 5px; display: none; margin-bottom: 40px' id='friendsinviter_faq_5'>
    Creating Google API Client allows you to support importing contacts using Google API
    <br>
    <br>

    <h3> 1. Navigate to <a target=_blank href="https://code.google.com/apis/console">Google API Console</a> </h3>
    <br>
    Sign in and create a new project.
    <br><br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/a.png">
    </div>

    <br><br>

    <h3> 2. Navigate to "API Access" tab on the left </h3>
    
    <br>
    
    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/b.png">
    </div>

    <br><br>

    <h3> 3. Create Client ID </h3>
    
    <br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/c.png">
    </div>

    <br><br>

    <h3> 4. Set Client ID configuration </h3>
    
    <br>
    Copy and paste the following url in the box :
    <br><br>

    Url: <span style="border: 1px solid #EEE; padding: 5px; font-size: 18px">
    <?php echo "http://{$_SERVER['HTTP_HOST']}"
                          . Zend_Controller_Front::getInstance()->getRouter()->assemble(array(
                                'module'      => 'friendsinviter',
                                'controller'  => 'index',
                                'action'      => 'oauthgmail',
                                ), 'default');
                          ?>
    </span>

    <br><br>
      
    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/d.png">
    </div>
    
    <br><br>

    <h3> 5. You have created your application. Copy the Client ID and Client secret to the Gmail settings in the Service Settings tab of the SE admin plugin page. </h3>
    
    <br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/e.png">
    </div>

  </div>


  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_6').style.display=='block') ? $('friendsinviter_faq_6').style.display='none' : $('friendsinviter_faq_6').style.display='block';">
    <?php echo $this->translate('Creating Yahoo API Client') ?>
  </div>
  <div style='border: 1px solid #F6F6F6; padding: 5px; display: none; margin-bottom: 40px' id='friendsinviter_faq_6'>
    
    Creating Yahoo API Client allows you to support importing contacts using Yahoo API
    <br>
    <br>

    <h3> 1. Navigate to <a target=_blank href="https://developer.apps.yahoo.com/dashboard/createKey.html">Yahoo API Console</a> </h3>
    <br>
    Sign in and create a new project.
    <br><br>

    Copy and paste the following url in the box to "Application URL" field:
    <br><br>

    Url: <span style="border: 1px solid #EEE; padding: 5px; font-size: 18px">
    <?php echo "http://{$_SERVER['HTTP_HOST']}"
                          . Zend_Controller_Front::getInstance()->getRouter()->assemble(array(
                                'module'      => 'friendsinviter',
                                'controller'  => 'index',
                                'action'      => 'oauthyahoo',
                                ), 'default');
                          ?>
    </span>

    <br><br>


    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/ya.png">
    </div>


    <br><br>

    <h3> 2. You have created your application. Copy the Yahoo App ID, Consumer Key and Consumer Secret to the Yahoo settings in the Service Settings tab of the SE admin plugin page. </h3>
    
    <br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/yb.png">
    </div>
      
  </div>

  


  <div style='cursor: pointer; margin-bottom: 10px; padding: 5px 10px; font-weight: bold; background-color: #F6F6F6' onclick="($('friendsinviter_faq_7').style.display=='block') ? $('friendsinviter_faq_7').style.display='none' : $('friendsinviter_faq_7').style.display='block';">
    <?php echo $this->translate('Creating Live (Hotmail) API Client') ?>
  </div>
  <div style='border: 1px solid #F6F6F6; padding: 5px; display: none; margin-bottom: 40px' id='friendsinviter_faq_7'>
    
    Creating Live API Client allows you to support importing contacts using Live API
    <br>
    <br>

    <h3> 1. Navigate to <a target=_blank href="http://go.microsoft.com/fwlink/p/?LinkId=193157">Live API Console</a> </h3>
    <br>
    Sign in and create a new project.
    <br><br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/la.png">
    </div>

    <br><br>

    <h3> 2. Proceed to Application Settings Page. </h3>
    
    <br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/lb.png">
    </div>

    <br><br>

    <h3> 3. Type in your website domain. </h3>
    
    <br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/lc.png">
    </div>

    <br><br>

    <h3> 4. You have created your application. Copy the Cliend ID, Client secret to the Live (Hotmail) settings in the Service Settings tab of the SE admin plugin page. </h3>
    
    <br>

    <div style='border: 1px solid #F6F6F6; padding: 5px'>
      <img src="application/modules/Friendsinviter/externals/images/help/ld.png">
    </div>
      
  </div>

  

</div>

<?php if($this->show !== ''): ?>
<script type="text/javascript">
<?php $faq_focus = ($this->show > 1) ? 1 : 0; ?>

en4.core.runonce.add(function() {
  friendsinviter_faq_show('friendsinviter_faq_<?php echo $this->show ?>',<?php echo $faq_focus ?>);
});
</script>
<?php endif; ?>